<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div class="box">
        <!-- <input type="text" @keyup.13="yang">  keyccode码-->
        <input type="text" @keyup.enter="yang">
        <!-- <div @keyup="yang1">测试div上是否能绑定</div> 不能 -->
        <!-- 
            常见按键修饰符
            可以是keyccode码 也可以是别名
            .enter  .tab  .space  .up  .down  .left  .right  .ctrl  .alt
         -->
    </div>
    <script>
        let vm = new Vue({
            el:'.box',
            methods:{
                yang(){
                    console.log('洋洋吃饱饱');
                },
                yang1(){
                    console.log('洋洋没吃饱');
                }
            }
        })
    </script>
</body>
</html>